The present invention relates to a method and apparatus for generating a skeleton pattern data representative of a skeleton of a character which is used to generate a painted character pattern used for printing or displaying a character and/or for generating painted character pattern data.
In a prior art apparatus, when a character such as a Kanji character is to be displayed or painted, a dot matrix pattern representative of the character is previously stored in a memory and it is displayed on an output device directly or in an enlarged or reduced scale.
When the enlarged character pattern is generated in this method, an outline of the character is not smooth. Accordingly, this method is not suitable for generation of a high quality of character pattern. Thus, where a dot matrix pattern is used, patterns of different sizes have to be prepared for each character. This requires a very large memory capacity.
As an approach to resolve the problem encountered in the dot matrix pattern method, a method for graphically generating a character pattern has been proposed. In this method for example, a graphic data representative of an outline of a character pattern is stored in a memory, and when a character pattern is to be generated based on the stored data, the data is processed for enlargement, or reduction and rotation by a known computer graphic technique so that the character is outputted in any size and any angle without degrading a quality of the pattern. It is important how simply the graphic data is generated. One example thereof is disclosed in "A Chinese META-FONT" by J. D. Hobby and G. U. Guoan, Proceeding of ICTP, 1983, pp. 62-63. In this method, a human describes a Kanji character pattern by a kind of computer language to use it as a pattern data. A character pattern is generated based on the pattern data in accordance with a predetermined conversion algorithm, and if the generated character pattern is determined to be inappropriate in shape, the description of the language is corrected. This method requires time for describing the language, checking the generated pattern and correcting the description.
In a method proposed by Kikuchi et al, Proceedings of 29th General Meeting of Information Processing Society of Japan, pp. 1435-1436 (Sept. 11-13, 1984), a character skeleton pattern comprising skeleton (enter) lines of elements of a character pattern is stored in a memory as a pattern data, and it is processed to generate a line pattern (character outline pattern) representative of an outline of the character pattern, and an inner area of the character outline pattern is painted to produce a desired character pattern.
Referring to FIG. 1, a construction of a Kanji character is explained. A character 101 is divided into three partial patterns 102-104. The first partial pattern 102 consists of three basic elements 203, 204 and 205. Those elements are called lateral line, left-downward line and dot, respectively. Each Kanji character consists of a plurality of basic elements. A Kanji pattern can be generated by the basic elements which compose the Kanji character and positions thereof. The position of the basic element can be specified by positions of a plurality of points on the basic element (called skeleton points). In the elements 203 and 205, a start point A and an end point B are used as the skelton points, and in the element 204, a midpoint C is additionally used. The basic element is approximated by a line or a segmental curve which connects the skeleton points. The Kanji character usually consists of a plurality of basic elements and the same basic element may be included in different Kanji characters. Accordingly, the number of kinds of basic elements required to display a number of Kanji characters is much smaller than a total number of Kanji characters.
FIG. 2A shows all basic elements and points thereof of the Kanji character shown in FIG. 1. Black dots show the skeleton points. The character pattern 201 consisting of those basic elements is hereinafter called a character skeleton pattern, because the basic elements of the character pattern of FIG. 2A may be considered to represent the skeleton lines (center lines) of the character pattern to be displayed. Data of the basic elements (kinds of elements and skeleton points) which belong to the pattern are called basic element data. In the article by Kikuchi et al, a character outline pattern consisting of outlines of the elements of the character to be displayed and a painted pattern thereof are generated based on the basic element data. In FIG. 2B, the character outline pattern 206 (solid line) is shown in superposition to the character skeleton pattern 201 (broken line).
In this method, only the skeleton pattern data is required as the pattern data and the preparation of the pattern data is easier in this method than in the first method. However, in this method, if the skeleton pattern is not appropriate, the shape of the painted character pattern generated based on the character skeleton pattern is not a desired one and the character skeleton pattern data must be corrected. Accordingly, it is important how simply the character skeleton pattern is prepared and how it is corrected.